#=====================================================================================================
READ ME
Title: Race, Gender, and Nascent Political Ambition
Journal: British Journal of Political Science
Authors: Andrea Junqueira, Diana O'Brien, Matthew Hayes, Jongwoo Jeong, Brian Crisp, and Matthew Gabel
Contact information: ajunqueira@astate.edu
#=====================================================================================================


INSTRUCTIONS:


All results found in the paper and Supplementary Information are replicated by the script Replication.R.
Tables and figures are saved to their corresponding folder, depending on where they appear
in the paper (e.g., Main Paper, SI A, SI B): MainPaperResults, SI_C_Results,
SI_D_Results, SI_E_Results, and SI_F_Results.
Folders destined to contain results (e.g., MainPaperResults, SI_C_Results,
SI_D_Results) are initially empty; they are populated with results after the 
script Replication.R is executed. 
In Replication.R, set the directory to the root folder. 
I estimate that the execution of Replication.R will take approximately 20 minutes.


The reported statistical analysis was performed using the following operational system,
software version, and package versions:


> sessionInfo()
R version 4.3.1 (2023-06-16)
Platform: aarch64-apple-darwin20 (64-bit)
Running under: macOS Sonoma 14.1

Matrix products: default
BLAS:   /System/Library/Frameworks/Accelerate.framework/Versions/A/Frameworks/vecLib.framework/Versions/A/libBLAS.dylib 
LAPACK: /Library/Frameworks/R.framework/Versions/4.3-arm64/Resources/lib/libRlapack.dylib;  LAPACK version 3.11.0

locale:
[1] en_US.UTF-8/en_US.UTF-8/en_US.UTF-8/C/en_US.UTF-8/en_US.UTF-8

time zone: America/Chicago
tzcode source: internal

attached base packages:
[1] grid      stats     graphics  grDevices utils     datasets  methods   base     

other attached packages:
 [1] MASS_7.3-60       texreg_1.38.6     xtable_1.8-4      survey_4.2-1      survival_3.5-5    srvyr_1.2.0       lme4_1.1-34      
 [8] Matrix_1.6-1      msm_1.7.1         ggeffects_1.7.0   insight_0.19.8    DescTools_0.99.54 margins_0.3.26    sandwich_3.0-2   
[15] lmtest_0.9-40     zoo_1.8-12        lubridate_1.9.2   forcats_1.0.0     stringr_1.5.0     dplyr_1.1.3       purrr_1.0.2      
[22] readr_2.1.4       tidyr_1.3.0       tibble_3.2.1      ggplot2_3.5.1     tidyverse_2.0.0  

loaded via a namespace (and not attached):
 [1] gld_2.6.6         gtable_0.3.4      prediction_0.3.14 lattice_0.21-8    tzdb_0.4.0        vctrs_0.6.3       tools_4.3.1      
 [8] generics_0.1.3    proxy_0.4-27      fansi_1.0.4       pkgconfig_2.0.3   data.table_1.14.8 readxl_1.4.3      lifecycle_1.0.3  
[15] rootSolve_1.8.2.4 compiler_4.3.1    Exact_3.2         munsell_0.5.0     mitools_2.4       class_7.3-22      nloptr_2.0.3     
[22] pillar_1.9.0      boot_1.3-28.1     nlme_3.1-162      tidyselect_1.2.0  mvtnorm_1.2-3     stringi_1.7.12    splines_4.3.1    
[29] colorspace_2.1-0  lmom_3.0          expm_0.999-7      cli_3.6.1         magrittr_2.0.3    fastDummies_1.7.3 utf8_1.2.3       
[36] e1071_1.7-13      withr_2.5.0       scales_1.3.0      timechange_0.2.0  httr_1.4.7        cellranger_1.1.0  hms_1.1.3        
[43] rlang_1.1.1       Rcpp_1.0.11       DBI_1.1.3         glue_1.6.2        minqa_1.2.6       rstudioapi_0.15.0 R6_2.5.1    




#########
# FILES #
#########


#--R Scripts--#


- ./Replication.R
Replicates all results presented in the main paper and appendices.


- ./Code/paperAnalysis.R
Reproduces the results presented in the main text of the manuscript.


- ./Code/AppendixC.R
Reproduces the results presented in SI C.


- ./Code/AppendixD.R
Reproduces the results presented in SI D.


- ./Code/AppendixE.R
Reproduces the results presented in SI E.


- ./Code/AppendixF.R
Reproduces the results presented in SI F.


-----------------------


#--Datasets--#


- ./Data/df.R
Dataset for analysis in which the respondent is the unit of analysis


- ./Data/df_long.RData
Dataset for analysis in which the respondent-office is the unit of analysis


-----------------------


#--Codebook--#


- ./codebook.txt
Informs about all variables' names and their meanings



